﻿<%@ WebHandler Language="C#" Class="checkLogName" %>

using System;
using System.Web;
using TierApplication;
public class checkLogName : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        string mlogin = context.Request["mlogin"].ToString();
        if (mlogin == "")
        {
            context.Response.Write("isnull");
            return;
        }
        if (mlogin.Length < 3)
        {
            context.Response.Write("tooless");
            return;
        }
        T_ACCOUNT account = new T_ACCOUNT();
        if(account.Exists(mlogin))
        {
            context.Response.Write("hasbeenres");
            return;
        }
        context.Response.Write("candonext");
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}